package com.ruoyi.system.third.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.StringJoiner;

/**
 * @Description TODO
 * @Classname RefundDTO
 * @Date 2025-3-29 15:23
 * @Author 12601786
 */
@ApiModel(value = "退款信息", description = "退款信息DTO")
public class RefundDTO {
    /** 门店编号 */
    @ApiModelProperty(value = "门店编号", example = "EW_N9479011740")
    private String merchantCode;

    /** 商户订单号 */
    @ApiModelProperty(value = "退款商户订单号", hidden = true)
    private String outTradeNo;

    /** 退款金额 */
    @ApiModelProperty(value = "退款金额", example = "88.88")
    private BigDecimal totalAmount;

    /** 支付渠道 */
    @ApiModelProperty(value = "支付渠道", example = "WXPAY")
    private String channel;

    /** 支付交易类型 */
    @ApiModelProperty(value = "支付交易类型", example = "MINIAPP")
    private String tradeType;

    /** 消费者用户标识 */
    @ApiModelProperty(value = "消费者用户标识", example = "2088412828586837")
    private String openId;

    /** 微信分配的小程序APPID */
    @ApiModelProperty(value = "微信分配的小程序APPID", example = "wxd678efh567hg6787")
    private String subAppId;

    /** 订单类型 */
    @ApiModelProperty(value = "订单类型", example = "0-停车缴费，1-水费，2-电费")
    private String orderType;

    /** 原订单编号 */
    @ApiModelProperty(value = "支付订单编号", example = "TCY174323329567912345678")
    private String orderSource;

    @ApiModelProperty(value = "退款原因", example = "仅退款")
    private String refundReason;

    public String getMerchantCode() {
        return merchantCode;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getSubAppId() {
        return subAppId;
    }

    public void setSubAppId(String subAppId) {
        this.subAppId = subAppId;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getOrderSource() {
        return orderSource;
    }

    public void setOrderSource(String orderSource) {
        this.orderSource = orderSource;
    }

    public String getRefundReason() {
        return refundReason;
    }

    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", RefundDTO.class.getSimpleName() + "[", "]")
                .add("merchantCode='" + merchantCode + "'")
                .add("outTradeNo='" + outTradeNo + "'")
                .add("totalAmount=" + totalAmount)
                .add("channel='" + channel + "'")
                .add("tradeType='" + tradeType + "'")
                .add("openId='" + openId + "'")
                .add("subAppId='" + subAppId + "'")
                .add("orderType='" + orderType + "'")
                .add("orderSource='" + orderSource + "'")
                .add("refundReason='" + refundReason + "'")
                .toString();
    }
}
